package cn.rxmind.dlicense.server.service.impl;

import cn.rxmind.dlicense.core.base.DLicenseContent;
import cn.rxmind.dlicense.core.creator.DLicenseCreator;
import cn.rxmind.dlicense.server.service.LicenseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 证书业务
 *
 * @author renxin
 * @email renxinzhiliangzhi@163.com
 * @date 2021/4/14 10:39 上午
 */
@Service
public class LicenseServiceImpl implements LicenseService {

    private DLicenseCreator licenseCreator;

    @Autowired
    public LicenseServiceImpl(DLicenseCreator licenseCreator) {
        this.licenseCreator = licenseCreator;
    }

    @Override
    public byte[] createLicense(DLicenseContent content) {

        return licenseCreator.createLicense(content);
    }

    @Override
    public DLicenseContent licenseDecode(byte[] bytes) {
        return null;
    }
}
